<template>
  <div>Login</div>
  <testCom></testCom>
</template>
<script setup>
import { useRoute } from 'vue-router' // 注意是 useRoute，而不是useRouter，二者是不一样的
import { onMounted } from 'vue'
import testCom from './test-com.vue'
const router = useRoute()
defineOptions({
  name: 'LoginIndex'
})
onMounted(() => {
  // console.log(router.query.id)
  console.log(router.params.id)
})
</script>
<style></style>
